package huixue.cn.com.rxapp.ui;

import android.os.Bundle;

import java.util.ArrayList;

import butterknife.BindView;
import butterknife.ButterKnife;
import huixue.cn.com.rxapp.R;
import huixue.cn.com.rxapp.base.SimpleActivity;
import huixue.cn.com.rxapp.stock.adapter.CoinAdapter;
import huixue.cn.com.rxapp.stock.entity.CoinInfo;
import huixue.cn.com.rxapp.stock.widget.HRecycleView;

public class CoinActivity extends SimpleActivity {

    private ArrayList<CoinInfo> mDataModels;

    @BindView(R.id.h_rcv_stock)
    HRecycleView hRcvStock;

    private CoinAdapter mCoinAdapter;

    @Override
    public int getLayout() {
        return R.layout.activity_coin;
    }

    @Override
    public void initView() {

    }

    @Override
    public void addEvent() {
        mDataModels = new ArrayList<>();
        for(int i=0;i<10000;i++) {
            CoinInfo coinInfo = new CoinInfo();
            coinInfo.name = "USDT";
            coinInfo.priceLast="20.0";
            coinInfo.riseRate24="0.2";
            coinInfo.vol24="10020";
            coinInfo.close="22.2";
            coinInfo.open="40.0";
            coinInfo.bid="33.2";
            coinInfo.ask="19.0";
            coinInfo.amountPercent = "33.3%";
            mDataModels.add(coinInfo);
        }

        mCoinAdapter = new CoinAdapter(this,mDataModels,R.layout.item_layout);
        hRcvStock.setAdapter(mCoinAdapter);
    }


}
